from django.contrib.syndication import feeds
from coolblog import models

class LatestArticles(feeds.Feed):
    title = models.Blog.instance().name
    link = '/'
    description = models.Blog.instance().description

    def items(self):
        return models.Article.get_all()[:5]
    
    def item_link(self, item):
        return '/article/%s/' % item.slug
